package com.fjn.collection;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class Stu {
    private String[] course;
    private List<String> sname;
    private Map<String,Integer> map;
    private Set<String> set;
    private List<Course> cs;

    @Override
    public String toString() {
        return "Stu{" +
                "course=" + Arrays.toString(course) +
                ", sname=" + sname +
                ", map=" + map +
                ", set=" + set +
                ", cs=" + cs +
                '}';
    }

    public void setCs(List<Course> cs) {
        this.cs = cs;
    }

    public void setSname(List<String> sname) {
        this.sname = sname;
    }

    public void setCourse(String[] course) {
        this.course = course;
    }

    public void setMap(Map<String, Integer> map) {
        this.map = map;
    }

    public void setSet(Set<String> set) {
        this.set = set;
    }

    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
        Stu stu = (Stu)applicationContext.getBean("stu");
        System.out.println(stu);
    }
}
